<template>
  <div class="chengde">
     <el-button class="cheaback" type="text" icon="el-icon-back" @click="hback"
      >返回</el-button
    >
    <h4>服务状态:{{fornasdg(formLabelAlign.status)}}</h4>
    <el-tabs>
      <el-row>
  <el-col :span="7"><div class="grid-content bg-purple">客户姓名：{{formLabelAlign.serviceUserName}}</div></el-col>
  <el-col :span="7"><div class="grid-content bg-purple-light">客户昵称：{{formLabelAlign.title}}</div></el-col>
  <el-col :span="7"><div class="grid-content bg-purple">手机号码:</div></el-col>
</el-row>

  <el-row>
  <el-col :span="7"><div class="grid-content bg-purple">服务人员：{{formLabelAlign.provideServiceUserName}}</div></el-col>
  <el-col :span="7"><div class="grid-content bg-purple-light">服务单号：{{formLabelAlign.serviceOrderId}}</div></el-col>
  <el-col :span="7"><div class="grid-content bg-purple">实付款：{{formLabelAlign.totalPrice}}</div></el-col>
</el-row>
<el-row>
  <el-col :span="7"><div class="grid-content bg-purple">付款方式：{{foemindatafo(formLabelAlign.payChannel)}}</div></el-col>
  <el-col :span="7"><div class="grid-content bg-purple-light">创建时间：{{formLabelAlign.createTime}}</div></el-col>
  <el-col :span="7"><div class="grid-content bg-purple">结束时间：</div></el-col>
</el-row>
    </el-tabs>
  </div>
</template>

<script>
import employeesConst from "@/constant/employees";
// 服务状态的
const hireTypegtrx = {};
employeesConst.hireTypyx.forEach((item) => {
  hireTypegtrx[item.status] = item.value;
});
//订单状态的
const hireTyMapx = {};
employeesConst.hireTypyengtx.forEach((item) => {
  hireTyMapx[item.payChannel] = item.value;
});
export default {
data () {
  return {
    formLabelAlign:{
      status:'',
      payChannel:'',
      createTime:''
    }
  }
},
created(){
 this.loachengts()
},
methods:{
  loachengts(){
         this.formLabelAlign = this.$route.query.row;
       console.log(this.formLabelAlign);


  },

  // 服务状态渲染
    fornasdg(code){
    return hireTypegtrx[code]
  },
    // 支付方式渲染
  foemindatafo(code){
  return hireTyMapx[code]
  },
  // 返回
    hback() {
      this.$router.back();
    },
}
}
</script>

<style scoped>
.chengde{
  background-color: #fff;
}
h4{
  color: #ff7144;
  margin-left: 30px;
}
.el-row{
  margin-bottom: 25px;
  margin-left: 80px;
  font-size: 14px;
}
</style>